<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>中标结果</title>
    <style>
        body {
            font-family: "Microsoft YaHei", sans-serif;
            margin: 0;
            padding: 0;
        }
        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 1px solid #e8e8e8;
        }
        .search-bar {
            display: flex;
            align-items: center;
        }
        .search-input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin-right: 10px;
            width: 250px;
        }
        .table {
            width: 100%;
            border-collapse: collapse;
        }
        .table th, .table td {
            border: 1px solid #e8e8e8;
            padding: 12px 15px;
            text-align: center;
        }
        .table th {
            background-color: #f8f8f8;
            font-weight: bold;
        }
        .table tr:nth-child(even) {
            background-color: #f9f9f9;
        }
        .company-link {
            color: #1890ff;
            text-decoration: none;
            cursor: pointer;
        }
        .company-link:hover {
            text-decoration: underline;
        }
        .success-icon {
            color: green;
            font-size: 18px;
        }
        /* 模态框样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        .modal-content {
            background-color: white;
            width: 80%;
            max-width: 800px;
            padding: 20px;
            border-radius: 5px;
            position: relative;
        }
        .close-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            cursor: pointer;
            font-size: 20px;
        }
        .print-btn {
            background-color: #1890ff;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            float: right;
            margin: 10px;
        }
        .print-options {
            display: none;
            position: absolute;
            background-color: white;
            border: 1px solid #e8e8e8;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 1001;
            padding: 10px;
            border-radius: 4px;
        }
        .print-option {
            padding: 8px 16px;
            cursor: pointer;
        }
        .print-option:hover {
            background-color: #f0f0f0;
        }
        /* 中标通知书样式 */
        .notice-content {
            padding: 20px;
        }
        .notice-title {
            text-align: center;
            font-size: 24px;
            margin-bottom: 30px;
        }
        .notice-table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        .notice-table td {
            border: 1px solid #ddd;
            padding: 12px;
        }
        .notice-table td:first-child {
            width: 120px;
            background-color: #f9f9f9;
        }
        .notice-footer {
            margin-top: 40px;
            text-align: right;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h2>中标结果列表</h2>
            <div class="search-bar">
                <input type="text" class="search-input" placeholder="请输入项目名称/负责人">
                <button>查询</button>
            </div>
        </div>
        
        <table class="table">
            <thead>
                <tr>
                    <th>NO.</th>
                    <th>项目名称</th>
                    <th>中标价</th>
                    <th>投标负责人</th>
                    <th>截止日期</th>
                    <th>中标状态</th>
                    <th>中标</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>1</td>
                    <td><a class="company-link" onclick="showCompanyDetail('维华建设有限公司', '5,524,852,545.00')">维华建设有限公司</a></td>
                    <td>5,524,852,545.00</td>
                    <td>张忠</td>
                    <td>2015-10-11</td>
                    <td>投标人选择提出比投标人高要求</td>
                    <td><span class="success-icon">●</span></td>
                </tr>
                <tr>
                    <td>2</td>
                    <td><a class="company-link" onclick="showCompanyDetail('中天投资有限公司', '256,483,333.00')">中天投资有限公司</a></td>
                    <td>256,483,333.00</td>
                    <td>李天</td>
                    <td>2012-10-11</td>
                    <td>投标人选择提出比投标人高要求</td>
                    <td><span class="success-icon">●</span></td>
                </tr>
                <tr>
                    <td>3</td>
                    <td><a class="company-link" onclick="showCompanyDetail('杭州天诚建设有限公司', '8,542,635.00')">杭州天诚建设有限公司</a></td>
                    <td>8,542,635.00</td>
                    <td>张辉</td>
                    <td>2012-09-30</td>
                    <td>投标人选择提出比投标人高要求</td>
                    <td><span class="success-icon">●</span></td>
                </tr>
                <tr>
                    <td>5</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td>6</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td>7</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td>8</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td>9</td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
            </tbody>
        </table>
    </div>

    <!-- 公司详情模态框 -->
    <div id="companyModal" class="modal">
        <div class="modal-content">
            <span class="close-btn" onclick="closeModal()">&times;</span>
            <button class="print-btn" onclick="togglePrintOptions()">打印</button>
            <div id="printOptions" class="print-options">
                <div class="print-option" onclick="printDocument()">打印</div>
                <div class="print-option" onclick="exportPrint()">导出打印</div>
            </div>
            <div class="notice-content">
                <h2 class="notice-title">中标通知书</h2>
                <p><span id="companyName">XXXXX公司</span>：</p>
                <p>在我公司组织的<span id="projectName">项目名称</span>项目邀标/询比价招标中，经评标委员会评审，确定贵公司为本项目中标单位，主要中标条件如下：</p>
                
                <table class="notice-table">
                    <tr>
                        <td>项目名称</td>
                        <td id="projectNameDetail"></td>
                    </tr>
                    <tr>
                        <td>建设地点</td>
                        <td>某某市某某区某某路</td>
                    </tr>
                    <tr>
                        <td>中标价格</td>
                        <td id="bidPrice">元</td>
                    </tr>
                    <tr>
                        <td>备注</td>
                        <td>施工技术符合标准, 质量符合要求</td>
                    </tr>
                </table>
                
                <p>本中标通知书经招标人盖章后发出。请在接到本中标通知书后 10 天内，到我单位签订项目<span id="projectNameFooter">项目名称</span>招标 合同。</p>
                <p>贵单位应按照招标文件和中标文件的要求开工。</p>
                
                <div class="notice-footer">
                    <p>招标单位：（盖 章）</p>
                    <p>日期： 年 月 日</p>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 显示公司详情模态框
        function showCompanyDetail(companyName, price) {
            const modal = document.getElementById('companyModal');
            document.getElementById('companyName').textContent = companyName;
            document.getElementById('projectNameDetail').textContent = companyName;
            document.getElementById('projectName').textContent = companyName;
            document.getElementById('projectNameFooter').textContent = companyName;
            document.getElementById('bidPrice').textContent = price + " 大写为 伍拾亿贰仟肆佰捌拾伍万贰仟伍佰肆拾伍元整";
            modal.style.display = 'flex';
        }
        
        // 关闭模态框
        function closeModal() {
            document.getElementById('companyModal').style.display = 'none';
            document.getElementById('printOptions').style.display = 'none';
        }
        
        // 显示/隐藏打印选项
        function togglePrintOptions() {
            const printOptions = document.getElementById('printOptions');
            if (printOptions.style.display === 'block') {
                printOptions.style.display = 'none';
            } else {
                printOptions.style.display = 'block';
            }
        }
        
        // 打印文档
        function printDocument() {
            alert('打印文档');
            togglePrintOptions();
        }
        
        // 导出打印
        function exportPrint() {
            alert('导出打印');
            togglePrintOptions();
        }
        
        // 点击模态框以外的区域关闭模态框
        window.onclick = function(event) {
            const modal = document.getElementById('companyModal');
            if (event.target === modal) {
                closeModal();
            }
        }
    </script>
</body>
</html>
